package com.bestillet.kyllingogco;

import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
import android.view.View;
import android.view.Window;
import android.widget.Button;

public class LoadingDialog extends Dialog {
	private Activity context;
	private Button cancel;
	
	private View.OnClickListener listener = new View.OnClickListener() {
		@Override
		public void onClick(View v) {
			dismiss();
			context.finish();
		}
	};
	
	public LoadingDialog(Context context) {
		super(context);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.loading);
		setCancelable(false);
		
		this.context = (Activity) context;
		
		cancel = (Button) findViewById(R.id.btnCancel);
		cancel.setOnClickListener(listener);
	}
}